-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework how the units view is updated #2400
Conversation
This commit moves the logic to update the units table into a dedicated method and adapts the code in a way, that the content of the units table is not regenerated on update, but the already existing table contents are updated as needed. This allows the table to keep its selection on update.
If the units view is reopened after it has already been opened once, call the newly created method to update the units table. Fixes longturn#2399.
I will keep this as a draft, while I do some additional testing. Feel free to comment and test. |
Something tells me that this is an issue from the get-go when I originally created the new view. I'll check it out on my local. |
The update of the buttons in the units view was triggered by a selection change in the units table. As the update of the units table no longer recreates its contents from scratch and the table therefore no longer loses its seletion, the buttons have to be updated explicitely after the update.
I fixed the one issue I noticed while testing locally, this should be ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The logic to update the units table has been moved into a dedicated method and has been adapted in a way, that the content of the units table is not regenerated on update. Instead the already existing table contents are updated as needed. This allows the table to keep its selection on update.
If the units view is reopened after it has already been opened once, this newly created method is called to update the units table.
Fixes #2399.